package com.shopping.dao;


import com.shopping.pojo.Business;
import com.shopping.pojo.vo.BusinessInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BusinessDao {
    // 获取商家列表
    public List<BusinessInfo> selectBusinessByQuery(@Param("businessName") String businessName, @Param("userName") String userName, @Param("start") int start, @Param("limit") int limit);
    // 获取商家列表数量
    public int getBusinessNum(@Param("businessName") String businessName, @Param("userName") String userName );
    // 登录验证
    public int checkBusinessIdAndPassword(@Param("businessId") String businessId,@Param("password") String password);
    // 修改店铺信息
    public int updateBusinessInfo(Business business);
    // 获取店铺名
    public String getBusinessName(String businessId);
    // 获取id
    public int getId(String businessId);
    // 验证店铺名唯一
    public int checkBusinessName(String businessName);
    // 获取店铺信息
    public BusinessInfo selectBusinessInfo(String businessId);
    // 获取店铺信息
    public Business selectBusiness(String businessId);
    // 店铺注销
    public int businessCancellation(String businessId);
    // 验证店主唯一
    public int checkBusinessOwner(Integer userId);
    // 店铺转让
    public int updateBusinessTransfer(@Param("userId") Integer userId,@Param("businessId") String businessId);
    // 修改店铺登录密码
    public int updateBusinessPass(@Param("businessId")String businessId,@Param("password")String password);
    // 搜索页根据店铺名搜索店铺
    public List<BusinessInfo> selectBusinessByBusinessName(String businessName);
    // 删除商家
    public int deleteBusiness(Integer id);
    // 注册审核
    public int updateBusinessStatusSuccess(Integer id);
    // 加入黑名单
    public int updateBusinessJoinBlackList(Integer id);
    // 移出黑名单
    public int updateBusinessRemoveBlackList(Integer id);
    // 验证商家信息
    public int checkBusinessInfo(@Param("businessId") String businessId,@Param("name") String name ,@Param("businessPhone") String businessPhone);
    // 注册商家
    public int insertBusiness(Business business);
    // 修改商家头像
    public int updateBusinessImage(@Param("businessId") String businessId,@Param("businessImage") String businessImage);
}
